import VueRouter from 'vue-router'

//导入组件
import HomeContainer from "./components/tabbar/HomeContainer.vue"
import MenberContainer from "./components/tabbar/MenberContainer.vue"
import ShopcarContainer from "./components/tabbar/ShopcarContainer.vue"
import SearchContainer from "./components/tabbar/SearchContainer.vue"
import NewsList from "./components/news/NewsList.vue"
import NewsInfo from "./components/news/NewsInfo.vue"
import Photo from "./components/photosharing/Photo.vue"

var router=new VueRouter({
    routes:[
        {path:"/",redirect:"/home"},//路由重定向
        {path:"/home",component:HomeContainer},
        {path:"/menber",component:MenberContainer},
        {path:"/shopcar",component:ShopcarContainer},
        {path:"/search",component:SearchContainer},
        {path:"/home/newsList",component:NewsList},
        {path:"/home/newsInfo/:id",component:NewsInfo},
        {path:"/home/photo",component:Photo}
    ],
    linkActiveClass:"mui-active"//高亮显示
})
export default router